filePath=~/Desktop/diffdatabase/
serverDB=distritable.txt
localDB=161table.txt
if [ -d $filePath ];then
echo exist $filePath
else
mkdir $filePath
fi
cd $filePath
echo server database
mysqldump -hmarswwyscrmmy01.mysqldb.chinacloudapi.cn -P3306 -umarswwyscrmmy01%scrm -p -d scrmdev>$serverDB
echo local database
mysqldump -h192.168.1.161 -P3306 -ubasic -p -d scrm>$localDB
diff $serverDB $localDB>diff.txt
echo OK!!!
